home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 1 (Walnut Creek)
/
Aminet - June 1993 [Walnut Creek].iso
/
aminet
/
misc
/
sci
/
lpdemo101.lha
/
LogicPlot
/
LogicPlot.doc
< prev
next >
Wrap
Text File
|
1992-12-09
|
23KB
|
563 lines
----------------------------------------------------------------------------------
Introduction "LogicPlot/Introduction"
----------------------------------------------------------------------------------
LogicPlot v1.01
Copyright © 1992
All Rights Reserved
Written by
Cyrus Michael Sanii
LogicPlot is a digital logic simulator program. With it, you can design a
digital circuit using various logic components. After designing the circuit
you can apply various inputs to the nodes of the circuit. LogicPlot will
then simulate the circuit and plot the outputs of the selected nodes.
Currently the following logic gates are supported:
a) 2 input AND
b) 3 input AND
c) 2 input NAND
d) 3 input NAND
e) 2 input OR
f) 3 input OR
g) 2 input NOR
h) 3 input NOR
i) 2 input XOR
j) inverter
k) buffer
l) Half Adder
m) Full Adder
n) RS flip-flop
o) Clocked RS flip-flop
p) D(data) flip-flop
q) JK flip-flop
r) T(toggle) flip-flop
In addition to this you can define your own gates and your own clocks
----------------------------------------------------------------------------------
Requirements "LogicPlot/Requirements"
----------------------------------------------------------------------------------
REQUIREMENTS
============
a) AmigaOS 2.04(or greater)
b) 512Kb free memory is more than enough to run either the demo version or
the release version. The demo version has a 10 node maximum, and allows
up to 5 user defined gates.
For the release version, a maximum of 50 nodes is allowed and up to
25 user defined gates.
c) MEMACS installed in the System:Tools directory in order to be able to
invoke the editor from LogicPlot(Otherwise you will have to use another
editor which saves files in straight text format..ie. no "funny" characters)
d) AmigaGuide installed in the System:Utilities directory in order to
access the online help system(If you do not have AmigaGuide you can
double-click on the LogicPlot.doc file to open a MORE window)
----------------------------------------------------------------------------------
Installation "LogicPlot/Installation"
----------------------------------------------------------------------------------
Installation
============
Copy all the files from the LogicPlot disk onto your Harddrive or make a
duplicate of the LogicPlot disk. DO NOT use the original disk for
simulations. You should always make a backup of your original disks, store
the originals in a safe place and use the backups for working with.
Harddrive Installation
----------------------
1) Place the LogicPlot disk in a floppy drive
2) When the disk icon appears double-click on it with the left-mouse button
3) Grab the LogicPlot drawer by holding down the left-mouse button while the
mouse pointer is on the LogicPlot drawer. While holding the mouse button
down drag the drawer to the harddisk you want to install LogicPlot on.
After you let go of the mouse button the LogicPlot files will be copied
to your harddrive.
4) Ensure you have T: assigned to a disk. For faster simulations assign T:
to the RAM disk.(ie. assign T: RAM:) This should be placed in your
S:User-Startup file.
Floppy Installation(You will need a single blank disk for this)
-------------------
1) Place the LogicPlot disk in a floppy drive
2) When the disk icon appears single-click on it with the left-mouse button
to select it
3) Move the mouse pointer to the top of the scren.
4) By holding the right-mouse button down near the top of the screen you
should get a pulldown menu. By selecting "COPY" a copy of the LogicPlot
disk will be made.
5) Ensure you have T: assigned to a disk. For faster simulations assign T:
to the RAM disk.(ie assign T: RAM:) This should be placed in your
S:User-Startup file.
Please refer to the AmigaDOS manuals for more information on how to make
disk backups and on the ASSIGN command.
----------------------------------------------------------------------------------
FilesInDistribution "LogicPlot/FilesInDistribution"
----------------------------------------------------------------------------------
FILES IN DISTRIBUTION
=====================
LogicPlot - the program, DO NOT modify this file
LogicPlot.guide - AmigaGuide Help/Documentation for LogicPlot
LogicPlot.doc - Normal Text file Help/Documentation for LogicPlot
CLOCKS - you may put user defined clock information in this file
GATEDEFS - you may put user defined gate definition information in
this file
Example1 - An example of a circuit using NAND and AND gates
Example2 - An example of a circuit using an RS flip-flop
Example.pic - Schematic diagram of Example1 and Example2 circuits
History - Text file with revision history of LogicPlot
----------------------------------------------------------------------------------
Usage "LogicPlot/Usage"
----------------------------------------------------------------------------------
Usage
=====
The steps involved in using LogicPlot are:
1) Start LogicPlot by either:
a) typing LogicPlot in a CLI
OR b) double-clicking with the mouse on the LogicPlot icon
2) Pick a screen mode by selecting the mode you want with the mouse and
then use View Mode to switch to that screen mode, after switching to
the mode you want select "Screen Mode OK"
3) The screen should now clear. You can use the menu options to either:
a) select a previously made data file (menu option "Pick Data File")
OR b) create/edit a data file (menu option "Edit Data File")
NOTE: Currently the editor that will start up is MEMACS.
Remember to save your file changes before exiting MEMACS.
4) Use the Configure option from the menu so that LogicPlot will be
configured the way you want. Use the mouse to move the "sliders"
to the values you want. Select "DONE" when finished configuring.
5) Select simulate from the pull down menu to run the simulation
The simulation should run and the outputs of the nodes you specified
will be plotted on the screen
----------------------------------------------------------------------------------
Example1 "LogicPlot/Example#1"
----------------------------------------------------------------------------------
Example #1
==========
1) Start LogicPlot by either:
a) typing LogicPlot in a CLI
OR b) double-clicking with the mouse on the LogicPlot icon
A new screen should appear with the name LogicPlot in the upper-lefthand
corner and the screen-to-back icon in the upper-righthand corner
2) You can now pick the screen mode you want to use for LogicPlot by clicking
on the mode you want with the left-mouse button and then click on the
"VIEW MODE" button or use the menu option "VIEW MODE" to switch to that
screen mode. If you do not like the mode you selected you may repeat this
process again. Once you are satisfied with the screen mode click on the
"SCREEN MODE OK" button or use the same option from the pull down menus.
The screen will then clear and only "LogicPlot" will appear in the
upper-lefthand corner of the screen with the screen-to-back icon in the
upper-righthand corner.
3) If you press the right-mouse button with the mouse pointer on the word
LogicPlot a pulldown menu should appear with the options:
Project <----menu title
Pick Data File <----loads a circuit file, simulates and plots the
specified outputs
Edit Data File <----loads the datafile in MEMACS so you can edit it
Configure <----lets you configure the LogicPlot program
Simulate <----Simulates your circuit
Help <----gives simple help
About <----info on version number, date released, author
Quit <----exits the LogicPlot program
4) Select "Edit Data File"
Memacs should start up. Now type in the following into the MEMACS editor
exactly as it appears below.(Note: This is the Example1 file on disk)
NAND2 0 1 2
NAND2 3 4 5
NAND2 6 7 8
AND3 2 5 8 9
CLOCK 0 0
CLOCK 1 1
CLOCK 3 3
CLOCK 4 4
CLOCK 5 6
CLOCK 3 7
LABEL 4 hi
LABEL 7 goodbye
SET 2 1
SET 8 1
PLOT 0
PLOT 1
PLOT 2
PLOT 3
PLOT 4
PLOT 5
PLOT 6
PLOT 7
PLOT 8
PLOT 9
5) Save the file to your work disk
6) Now select the Configure option from the menu
A small window should appear in the center of your screen with various
options you can set. To move the sliders merely place your mouse pointer
over the black scroll bar and press the left mousebutton to grab the slider.
You can then move the mouse(while holding the left button down) to set the
slider's value. Once the slider is at the value you want release the left
mousebutton.
When finished setting the configuration, press the left mousebutton while
the mouse pointer is on the DONE button. The small window should then
disappear.
7) Select the menu again by holding the right-mouse button and select the
"Pick Data File" option. A file requester will appear on the screen. You
can then pick the file you saved the data to. After picking the file and
selecting "OK" the file will be loaded and the simulation will begin. A
small STATUS window will appear on screen showing you how much of the
simulation is left to be calculated. Once the simulation has been
calculated, the selected nodes will be plotted.
Once you have simulated the circuit you can alter the configuration values
and simulate the circuit again.
NOTE: When entering node numbers for a circuit please ensure that the lower
node numbers are closer to the inputs rather than the outputs of the
circuit. I have implemented a crude sorting function, so you may get
different results if you number the nodes the other way around and
configure LogicPlot to have a low number of gate delays per clock cycle.
----------------------------------------------------------------------------------
Example2 "LogicPlot/Example2"
----------------------------------------------------------------------------------
Example#2
=========
This is just an example of how to to use a flip-flop in a circuit. You can
follow the same procedures as in Example#1. A data file should be created
with the information below in it.(Note: This is Example2 on disk)
RSFF 0 1 2 3
CLOCK 0 0
CLOCK 1 1
PLOT 0
PLOT 1
PLOT 2
PLOT 3
LABEL 0 R
LABEL 1 S
LABEL 2 Output
LABEL 3 NOT_Output
This will simulate a RS-type flip-flop with node#0 being R and node#1 being S.
The normal output will be on node#2 and the inverted output on node#3. In
the simulation you will notice that when both R and S are both low the plot
has a solid region. This is to show that an error has occurred, as having
both R and S low is not allowed on RS flip-flops.
----------------------------------------------------------------------------------
GatesSupported "LogicPlot/GatesSupported"
----------------------------------------------------------------------------------
Gates Supported
===============
GATENAME DESCRIPTION
======== ===========
AND2 2 input AND gate
NAND2 2 input NAND gate
OR2 2 input OR gate
NOR2 2 input NOR gate
XOR2 2 input XOR gate
INV an inverter
BUF a buffer
AND3 3 input AND gate
NAND3 3 input NAND gate
OR3 3 input OR gate
NOR3 3 input NOR gate
HADDER Half Adder Input1=A Output1=Sum
Input2=B Output2=CarryOut
FADDER Full Adder Input1=A Output1=Sum
Input2=B Output2=CarryOut
Input3=Carryin
RSFF RS type flip-flop Input1=R Output1=Output
Input2=S Output2=NOT(Output)
CRSFF Clocked RS type flip-flop Input1=Clock Output1=Output
Input2=R Output2=NOT(Output)
Input3=S
DFF D(data) type flip-flop Input1=Clock Output1=Output
Input2=Data Output2=NOT(Output)
JKFF JK type flip-flop Input1=Clock Output1=Output
Input2=J Output2=NOT(Output)
Input3=K
TFF T(toggle) type flip-flop Input1=T Output1=Output
Output2=NOT(Output)
In addition to this you can define your own gates and your own clocks
----------------------------------------------------------------------------------
OtherCommands "LogicPlot/OtherCommands"
----------------------------------------------------------------------------------
Other Commands
==============
CLOCK - used in the data file to specify which clock you want to apply
as an input to a node
Eg. Apply CLOCK0 to Node#1
CLOCK 0 1
LABEL - used to put a label on the output plots for the specified node
Eg. Give Node#4 a label of "WOW"
LABEL 4 WOW
SET - used to set an initial logic value for a node
Eg. Set the initial logic value of Node#3 to high(TRUE,1)
SET 3 1
PLOT - tells LogicPlot to plot the logic values of the specified node
Eg. Plot the logic values of node#4
PLOT 4
----------------------------------------------------------------------------------
CreatingCustomClocks "LogicPlot/CreatingCustomClocks"
----------------------------------------------------------------------------------
Creating Custom Clocks
======================
You can create your own custom clocks by using the following steps:
1) Run your favorite editor(It must save in standard ASCII format)
2) Load the CLOCKS file into the editor. It should look something
similar to this:
0101010101010101010101010101010101010101010101010101010101010101
0011001100110011001100110011001100110011001100110011001100110011
0000111100001111000011110000111100001111000011110000111100001111
0000000011111111000000001111111100000000111111110000000011111111
0000000000000000111111111111111100000000000000001111111111111111
0000000000000000000000000000000011111111111111111111111111111111
The above information is for CLOCK0-CLOCK5
The first line in the data file defines CLOCK6
The second line in the data file defines CLOCK7
....
The Nth line in the data file defines CLOCK(N+5)
3) The CLOCKS file stores the data for 32 clock cycles(which is the
equivalent to 64 time periods) for each defined CLOCK#. To create your
custom clock, add your data on a new line in the CLOCKS file. For each
clock you create you MUST enter 64 logic values(in some combination of
0's and/or 1's)
For example CLOCK0 will be 0 initially and then it will be 1 after
one time period. It will then return back to 0 after the second
time period. It is thus alternating logic values each time period.
CLOCK1 will be 0 initially and will stay 0 until 2 time periods have
passed. It will then change value to 1 and stay that value for 2
time periods. CLOCK1 thus alternates logic values every 2 time periods.
***NOTE: One clock cycle = 2 time periods
----------------------------------------------------------------------------------
CreatingCustomGates "LogicPlot/CreatingCustomGates"
----------------------------------------------------------------------------------
Creating Custom Gates
=====================
You can create your own custom gates by using the following steps:
1) Run your favorite editor(It must save in standard ASCII format)
2) Load the GATEDEFS file into the editor. It should look something
similar to this:
AND5 5 1 0
^^^^^ ^ ^ ^
||||| | | ------1 only if the gate needs a clock pulse to change values
||||| | |
||||| | --------the number of output pins this gate has
||||| |
||||| ----------the number of input pins this gate has
|||||
-----------------the gate name(maximum length is 10 characters)
Add your Gate name to the end of the file along with the appropriate
numbers for the input pins, output pins and the indicator for
whether this gate needs a clock or not.
The next line in the file will look something similar to the line
below:
0000100001000010000100001000010000100001000010000100001000010000
This line stores the data for 32 clock cycles(which is the equivalent
to 64 time periods) for each defined gate. To create your custom
gate, add your data on a new line in the OUTPUTS file. For each
gate you create you MUST enter 64 logic values for each output pin(in
some combination of 0's, 1's, 2's, 3's, 4's or 5's)
0-represents a logic 0
1-represents a logic 1
2-represents no change from the previous logic value
3-represents toggle the logic value(ie. value=NOT(current value)
4-represents an error condition
5-represents that the output on this pin is the inverse of the output
on the first output pin of this gate
These numbers are a representation of the logic table for the gate.
Example 1: 2 input AND gate(AND2) with 1 output pin
Does NOT require a clock pulse
Logic Table
===========
INPUT0 INPUT1 OUTPUT1
=====================
0 0 0
1 0 0
0 1 0
1 1 1
This logic table describes the outputs for all possible input combinations.
You now repeat the OUTPUT1 values over and over until there are 64 entries
on the line. You can now define an AND2 gate with the following 2 lines:
AND2 2 1 0
0001000100010001000100010001000100010001000100010001000100010001
=========================================================================
Example 2: Clocked RS Flip-Flop(CRSFF)
INPUT1=CLOCK, INPUT2=R, INPUT3=S, OUPUT1=Q, OUTPUT2=NOT(Q)
Requires a clock pulse
Logic Table
===========
INPUT1 INPUT2 INPUT3 OUTPUT1 OUTPUT2
====================================
0 0 0 0 1
1 0 0 0 1
0 1 0 0 1
1 1 0 1 0
0 0 1 0 1
1 0 1 1 0
0 1 1 1 0
1 1 1 1 0
So to define this gate you would first take the OUTPUT1 values and repeat
them so there are 64 values and put that on one line of the OUTPUTS file.
On the next line of the OUTPUTS file you would repeat the OUTPUT2 values.
Actually since the OUTPUT2 values are always the inverse of the OUTPUT1
values you could just have 5's across the whole 64 values.
So you could define the CRSFF with the following 3 lines:
CRSFF 3 2 1
0001011100010111000101110001011100010111000101110001011100010111
1110001011100010111000101110001011100010111000101110001011101000
OR with the following 3 lines:
CRSFF 3 2 1
0001011100010111000101110001011100010111000101110001011100010111
5555555555555555555555555555555555555555555555555555555555555555
==========================================================================
***NOTE: One clock cycle = 2 time periods
***NOTE: Input0 is the only input that can require a clock pulse input
----------------------------------------------------------------------------------
Limitations "LogicPlot/Limitations"
----------------------------------------------------------------------------------
Limitations
===========
-Maximum length of a gate name is 10 characters
-Maximum number of clock cycles to simulate for is 32
-Maximum number of inputs for a user defined gate is 6
-Each gate can require at MOST one clock input(up to 5 other inputs allowed)
-The first command in a data file MUST NOT be a user-defined gate
Demo Release
Version Version
======= =======
Maximum number of gates that can be user defined: 5 25
Maximum number of clocks that can be user defined: 10 20
Maximum number of nodes: 10 50
Maximum number of gates+clocks: 10 50
----------------------------------------------------------------------------------
Disclaimer "LogicPlot/Disclaimer and Author Info"
----------------------------------------------------------------------------------
LogicPlot Information
=====================
LogicPlot Copyright © 1992 Cyrus Michael Sanii, All Rights Reserved.
The DEMO version is freely distributable as long as all of its files are
included in their original form without additions, deletions, or
modifications of any kind, and only a nominal fee can be charged for its
distribution. This software is provided "AS IS" without warranty of any
kind, either expressed or implied. By using LogicPlot, you agree to accept
the entire risk as to the quality and performance of the program.
The release version IS NOT freely distributable in ANY form or manner.
Please send your comments, wishes, and bug reports for LogicPlot to:
Cyrus Michael Sanii
19-1404 Rosenthal Avenue
Ottawa, Ontario
Canada
K1Z 8H9
Remember to state the version number you are using, in all correspondence.
----------------------------------------------------------------------------------
HowToPurchaseTheReleaseVersion "LogicPlot/How To Purchase the Release Version"
----------------------------------------------------------------------------------
To purchase the release version of LogicPlot send a cheque or money
order for $50 Canadian to:
Cyrus Michael Sanii
19-1404 Rosenthal Avenue
Ottawa, Ontario
Canada
K1Z 8H9